About Color

What is color ? That's an interesting question and the answer will be too. This one is interesting mostly because it as multiple aspects. The "what is color "-question may be related to the way human beings view it (We won't consider the innumerous but still fascinating color perceptions through animals. Although we love animals it's certainly not our purpose right here !) or the way an output devise displays it ( Really different if you're talking about a CRT screen or a color printer !). How photographs or painters use color ? Later on w`ll discuss the way computer "understand" colors.

The following one is not supposed to be a comprehensive discussion but will give you an appreciation of some of the problems that come up when people start to deal with colors. However, the aim of what's coming is to shortlyly make you understand what is color with the clear objective to give you a sufficient background to start with computer image editing. So, just below you've got the theory and the boring explanations of the up-coming problems of color management in computer systems.

Still interested ? Go ahead and take a look on the menu before going to the hard stuff.

Table of contents :

Light and color spectrum

Electromagnetic energy that exists in the form of wavelengths creates the perception of color.

When light strikes a surface there are two things that can happen: the light is reflected or light that is not reflected can partially or completely penetrates the body of the material. Light may pass completely through a material, in which case we say that it has been transmitted. Light can also be absorbed or scattered by the material.

The energy that is absorbed by molecules can be dissipated as kinetic and heat energy, (that explains why a black object is much warmer than a white one when submitted to light for while : the black one absorbs all wavelength of light by opposition of the white one who reflects it all. In some case the energy can be re-emitted. Fluorescence and phosphorescence are phenomena that result from the re-emission of absorbed light energy.

When light strikes particles it may be scattered. The absorption and scattering properties of particles are complex and a number of theories exist to describe them.

So there are many reasons why substances appear colored but for most physical materials it is because the absorption and scattering properties of the material are different for different wavelengths of light. Thus a substance that appears yellow may do so because it absorbs most strongly in the blue part of the spectrum and scatters most strongly in the red and green parts of the spectrum.

Return table of contents

Color perception : the human eye

Almost the whole of the interior of the spherically shaped eyeball is lined with a layer of photosensitive cells (rods and cones) known collectively as the retina and it is this structure that is the sense organ of vision. The retina translates light into nerve signals to the brain through the optic nerve.

The rods and cones contain visual pigments. Visual pigments are much like any other pigments in that they absorb light with absorption sensitivities that are wavelength dependent. The visual pigments have a special property, however, in that when a visual pigment absorbs a photon of light it changes molecular shape and at the same time releases energy. The pigment in this changed molecular form absorbs light less well than before and thus is often said to have been bleached. The release of energy by the pigment and the change in shape of the molecule together cause the cell to fire, that is to release an electrical signal, by a mechanism that is still not completely understood.

The difference between rods and cones

Rods are sensitive to very low levels of illumination and are responsible for our ability to see in dim light (scotopic vision). They contain a pigment with a maximum sensitivity at about 510 nm, in the green part of the spectrum. Scotopic vision is completely lacking in color; a single spectral sensitivity function is color-blind and thus scotopic vision is monochromatic.

Color vision is provided by the cones, of which there are three distinct classes each containing a different photosensitive pigment. The three pigments have maximum absorption at about 430, 530, and 560 nm and the cones are often called ''blue", ''green", and ''red".

The existence of three spectral sensitivity functions provides a basis for color vision since light of each wavelength will give rise to a unique ratio of short-, medium-, and long-wavelength cone responses. The visible spectrum is the range of light that can be seen with the unaided eye. Wavelengths above the visible spectrum are infrared (heat). The wavelengths below the visible spectrum include ultraviolet, x-rays and gamma rays.

The rods and cones are not evenly distributed on the retina. The central part of the retina, the fovea, contains only cones whereas at greater eccentricities there is a greater preponderance of rods. In the fovea the cones are densely packed and it is this part of the retina that provides the greatest spatial resolution under normal viewing conditions.

The eye as a finite number of color receptors that respond to the full range of light frequencies (about 380 to770 nanometers). As a result, the eye theoretically supports only the perception of around 10,000 different colors simultaneously (many more colors can be perceived though not resolved simultaneously). Enough to see that life is great and colorful isn't it? But human vision has it's limitations.

First, the ability to discern colors varies from person to person; it's been estimated that one out of every twelve people has some form of color blindness.

Second, the eye is limited in its ability to resolve the color of tiny objects. The size of a pixel on a typical CRT display screen is less than a third of millimeter in diameter. When a large number of pixels are packed together; each one a different color, the eye is unable to resolve where one pixel ends and the next one begins. To bridge the gap between two adjacent differently colored pixels the brain will integrate, average, ignore the blur, or otherwise adapt to the situation.

And third, the eye is also biased to the kind of light it detects. It's most sensitive to green light, followed by red and blue. A good example of this is when you're looking at three different light sources on the dark. Each one at the same distance and of three different colors, the green light will appear to you to be closer, than the red one and at least the blue light. The impression of brightness of the green light just comes from the better ability of our eyes to perceive the green colors.

Finally, in some case visual perception system can sense contrast between adjacent colors easily than it can sense absolute differences if those colors are physically separated in the object being viewed. For these reasons and others the eye typically perceives many fewer colors than are displayed on the output device.

Return table of contents

Additive and subtractive color systems

In the following systems, all colors are created by mixing varying amounts of the three primary colors (which differ depending on the color model you deal with). Those primary colors are simply the ones that can not be created by mixing any other colors. Another important definition is the color gamut which only represents the whole number of colors that can be created using the magic-3 primary colors.

There are two major categories of color systems : Additive color systems and subtractive color systems. But how do they work ?

Additive principle

The primary colors of additive color reproduction are red, blue, and green. When these three primary colors are projected on one another in equal parts they produce white light. Other colors can be created by varying the intensities of red, blue, and green. The absence of RGB colored light results in black. Your computer monitor is based on additive color. Red, blue, and green phosphor coatings on the screen are hit by electron streams that emit colored light. Monitors produce transmissive colors, which means projected light energy is passed through a filter to produce color.

As sead before RGB is the mode used to display images on your monitor's screen, it's also used by scanners to get pictures into computer files so that your computer can process them. This mode is the most widely used in image processing.

An example : How to represent yellow? Yellow isn't a primary color in the RGB color system thus by mixing pure red and pure green you've got your requested yellow. RGB mode certainly requires some training so the sooner you start mixing colors in image editing programs the quicker you'll progress in understanding color systems.

Subtractive principle

Subtractive colors are produced when white light falls on a colored surface and is partially reflected. The new colors are subtraced from white light by pigments and the reflected wavelenght reach to human eye to create the impression of coloe. Subtractive color is based on the three colors cyan, magenta and yellow (CMY). Other colors are produced by varying the mixture of these primary colors. This color system is called subtractive because pigments subtract different amounts of the three primary colors from white. Whn illuminated each of the three primary colors absorbs its complementary light color. Cyan absorbs red; magenta absorbs green; and yellow absorbs blue. For example, by increasing the amount of yellow ink in a printed picture, the amount of blue decreased. When these three colors are mixed together at 100% they produce black. The absence of CMY pigments would result in white.

This is certainly the first color model that humanity discovered through the ages with the development of painting technics. And thanks to scientific approach of painting like did Leonado Da Vinci and others back in the 16th century, knoledge of colors made a great step behind.

Printing and photography are based on subtractive color reproduction. However, printing adds a fourth color black which compensates for impurities in the ink and the color of paper you use (which is never completely white). The combination of cyan, magenta, and yellow ink results in a muddy brown. Black is denoted by the letter K to avoid confusion between blue and black. So here goes the abbreviation : C (cyan), M (magenta), Y (yellow), K (black)

Return table of contents

Others color systems

Additive and substractive color modes are not the only ones.

HSL color model

HSL (Hue Saturation Luminosity) is the most intuitive because it is based on the human perception of color. In the HSL model, all colors are described in terms of three fundamental characteristics, hue, saturation and luminosity.

Hue is the wavelength whithin the color spectrum, so it is pure colors (or tones) that compose the rainbow. Hue values are defined as a location on the standard color wheel and are expressed as a degree between 0░ and 360░.

The chromatic whell (or color wheel)

More commonly, hue is identified by the name of the color such as red, orange, or green. Red is located at 0, yellow at 60 degrees, green at 120, cyan at 180 degrees, blue at 240 degrees and magenta at 300. Remenber that computers don't understand words like red, blue and thus are to be told numerical values for colors !

Saturation, sometimes referred to as chroma, is the intensity or purity of the color. Saturation represents the amount of gray in proportion to the pure tone as represented in the chromatic wheel. Saturation values range from 100 (100% fully satured hue) to 0 (pure grayscale tones). For example, the most vivid red transform itself on a light pink if the saturation is set to 10%. On the standard color wheel, saturation increases as one approaches the edge of the wheel; saturation decreases as one approaches the center.

Luminosity is the relative lightness or darkness of the color and is usually measured as a percentage from 0% (black) to 100% (white) the other values represent the whole range of grays.

Grayscale color mode

You make ask yourself why so many people like to work with grayscale pictures or edit only black and white documents. Pay attention to the response; you may regret your purchase if you've just bought a brand new color-printer on the other hand consider it as an advice if you think of buying one.

It's better to work in black and white. Photographers know it very well. Non-color pictures have an higher definition and look prettier. Talking about editing documents, they certainly look more professionnal when they can avoid useless colors. Take note that the really quality of appearence of any document relies on the choices you make (font, paragraphs disposals, printer resolution ...). For the best output, use the contrast between black and white (which makes the documents appear very clean, thus NO COLORS !) and print them on a laser printer at an higher resolution (1400 dpi is good). Yeah, seriously think twice before giving an agressive colorful document to your chief executive (if you have one!) or sending an application letter.

Return table of contents

Color representation in computers

The way computers understand color is completly different than our's. You can't tell a computer to process a red or purple color because this words doesn't mean anything to him (the computer). Color data in computer systems is stored using different mathematical models. Thus color in computers is always represented by numerical values. The following text introduces you to the most common color models used in computer graphics.

The RGB model

As discussed earlier this three-chromatic color system considers red, green and blue as fundamental and undecomposable colors sometimes called color channels. Composite colors can than be specified by providing an RGB triplet in the form (R,G,B). Instead of using percentages to specify the amount of each primary color, RGB triplets are stored in the range 0 to 255 (with 0 representing zero intensity and 255 representing maximum intensity).

Each color value is represented by a triplet as follows :

RGB = [ (0-255) , (0-255) , (0-255) ]

Examples :

If you remember the additive color theory : black is specified as 0% red, 0% green and 0% blue

(0,0,0) Black
(255,255,255) White
(255,0,0) Red
(0,255,0) Green
(0,0,255) Blue

And to define Yellow; you mix red and green :

(255,255,0) Yellow

All composite colors are specified this way and remark that with a 0-255 range you can create more than 16 million colors!!!(256*256*256 = 16777216) The gamut defined using this range for the three primary colors is called truecolor because it represents the total wavelength of light unaid human eyes can disciminate.

The CMY model

The CMY system works exactly the same except that the three fundamental colors are cyan, magenta and yellow and that those colors are subtracted from white.

(255,255,255) Black
(0,0,0) White
(255,0,0) Cyan
(0,255,0) Magenta
(0,0,255) Yellow

And blue in the CMY model?

(255,255,0) Blue

Like in the RGB model all other composite colors are created this way, but for printing devices use a practical variant of the CMY model (see above for the CMYK model). With the adjunction of a fourth value for the black component, CMYK model is often expressed as a serie of four color values called 4-color printing or process control.

Return table of contents